Filename | (eval 1134)[/usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Document.pm:78] |
Statements | Executed 0 statements in 0s |
Eval Invoked At | /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Document.pm line 78 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 1 | 1 | 39µs | 47µs | __ANON__[:16] (merge of 4 subs) | Template::Document::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 47µs (39+8) within Template::Document::__ANON__[(eval 1134)[/usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Document.pm:78]:16] which was called 4 times, avg 12µs/call:
# (data for this subroutine includes 3 others that were merged with it)
# 4 times (39µs+8µs) by Template::Document::process at line 163 of Template/Document.pm, avg 12µs/call | ||||
2 | my $context = shift || die "template sub called without context\n"; | ||||
3 | 4 | 8µs | my $stash = $context->stash; # spent 8µs making 4 calls to Template::Context::stash, avg 2µs/call | ||
4 | my $output = ''; | ||||
5 | my $_tt_error; | ||||
6 | |||||
7 | eval { BLOCK: { | ||||
8 | $output .= "<script type=\"text/javascript\">\n//<![CDATA[\nfunction keep_text(clicked_index) {\n var searchboxes = document.getElementsByClassName(\"head-searchbox\");\n var persist = searchboxes[0].value;\n\n for (i = 0; i < searchboxes.length - 1; i++) {\n if (searchboxes[i].value != searchboxes[i+1].value) {\n if (i === searchboxes.length-2) {\n if (searchboxes[i].value != searchboxes[0].value) {\n persist = searchboxes[i].value;\n } else if (searchboxes.length === 2) {\n if (clicked_index === 0) {\n persist = searchboxes[1].value;\n }\n } else {\n persist = searchboxes[i+1].value;\n }\n } else if (searchboxes[i+1].value != searchboxes[i+2].value) {\n persist = searchboxes[i+1].value;\n }\n }\n }\n\n for (i = 0; i < searchboxes.length; i++) {\n searchboxes[i].value = persist;\n }\n}\n//]]>\n</script>\n"; | ||||
9 | } }; | ||||
10 | if ($@) { | ||||
11 | $_tt_error = $context->catch($@, \$output); | ||||
12 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
13 | } | ||||
14 | |||||
15 | return $output; | ||||
16 | } | ||||
17 | |||||
18 | ; |